﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ledict.ConditionExtract.BLL
{
   public  class DefusePrivacy
   {
       ProcessDataSourceBLL datas = new ProcessDataSourceBLL();
       RegexParse.RegexParse getregex = new RegexParse.RegexParse();
        /// <summary>
        /// 隐私处理
        /// </summary>
        /// <param name="ParagraphText"></param>
        /// <param name="CaseId"></param>
        /// <returns></returns>
        public string Privacy(string ParagraphText, string CaseId)
        {
            string Fields = datas.ExceptAdditionalFields(CaseId).Replace("，",",");
            Fields = getregex.GetParseValue("CC1509171748560001", Fields);//去掉多余的逗号
            Fields = Fields.Replace(",", "|").Replace("，", "|").Trim ();//取人名
            if (Fields!="")
            {
                ParagraphText = System.Text.RegularExpressions.Regex.Replace(ParagraphText, Fields, "×××");//挖空人名
            }
            ParagraphText = getregex.GetParseValue("CC1508221657230001", ParagraphText);//排除金额，多×××
            return  getregex.GetParseValue("CC1508211030520001", ParagraphText);//排除某些字符
               
        }


    }
}
